<h3 class="page-heading">TDengine Connection</h3>

<div class="gf-form-group">
	<div class="gf-form max-width-30">
		<span class="gf-form-label width-7">Host</span>
		<input type="text" class="gf-form-input" name="url" ng-model='ctrl.current.url' placeholder="http://localhost:6041"
			bs-typeahead="{{['http://localhost:6041']}}" required></input>
	</div>

	<div class="gf-form-inline">
		<div class="gf-form max-width-15">
			<span class="gf-form-label width-7">User</span>
			<input type="text" class="gf-form-input" name="user" ng-model='ctrl.current.jsonData.user' placeholder="root"></input>
		</div>
		<div class="gf-form max-width-15">
			<span class="gf-form-label width-7">Password</span>
			<input type="password" class="gf-form-input" name="password" ng-model='ctrl.current.jsonData.password'
				placeholder="taosdata"></input>
		</div>
	</div>
</div>
<div class="gf-form max-width-30">
	<h3 style="padding-top:4px;padding-right:15px;">Alibaba Cloud Sms Config</h3>
	<div class="gf-form-switch " style="margin-left:4px;">
		<input type="checkbox" name="smsShowFlag" ng-model="ctrl.smsShowFlag">
		<span class="gf-form-switch__slider" ng-click="ctrl.smsShowChange()"></span>
	</div>
	<div class="gf-form-label">{{ctrl.smsShowFlag?"show":"hide"}}</div>
</div>
<div class="gf-form-group" ng-show="ctrl.smsShowFlag">
	<div class="gf-form max-width-30">
		<span class="gf-form-label width-7">accessKeyId</span>
		<input type="text" class="gf-form-input" name="accessKeyId" ng-model='ctrl.current.jsonData.smsConfig.alibabaCloudSms.accessKeyId' placeholder="xxxxxxxxxxxxxxxxxxxxxxx"
			></input>
	</div>
	<div class="gf-form max-width-30">
		<span class="gf-form-label width-7">accessKeySecret</span>
		<input type="text" class="gf-form-input" name="accessKeySecret"
			ng-model='ctrl.current.jsonData.smsConfig.alibabaCloudSms.accessKeySecret' placeholder="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ></input>
	</div>
	<div class="gf-form-inline">
		<div class="gf-form max-width-15">
			<span class="gf-form-label width-7">signName</span>
			<input type="text" class="gf-form-input" name="signName" ng-model='ctrl.current.jsonData.smsConfig.alibabaCloudSms.signName' placeholder="xxx"
				></input>
		</div>
		<div class="gf-form max-width-15">
			<span class="gf-form-label width-7">templateCode</span>
			<input type="text" class="gf-form-input" name="templateCode"
				ng-model='ctrl.current.jsonData.smsConfig.alibabaCloudSms.templateCode' placeholder="SMS_xxxxxxxxxx" ></input>
		</div>
	</div>
	<div class="gf-form max-width-30">
		<span class="gf-form-label width-7">templateParam</span>
		<input type="text" class="gf-form-input" name="templateParam"
			ng-model='ctrl.current.jsonData.smsConfig.alibabaCloudSms.templateParam' placeholder='{"alarm_level":"%s","time":"%s","name":"%s","content":"%s"}' ></input>
	</div>
	<div class="gf-form max-width-30">
		<span class="gf-form-label width-7">phoneNumbers</span>
		<input type="text" class="gf-form-input" name="phoneNumbersList" ng-model='ctrl.current.jsonData.smsConfig.phoneNumbersList'
			placeholder="131xxxxxxxx,132xxxxxxxx" ></input>
	</div>
	<div class="gf-form max-width-30">
		<span class="gf-form-label width-7">listenAddr</span>
		<input type="text" class="gf-form-input" name="listenAddr" ng-model='ctrl.current.jsonData.smsConfig.listenAddr'
			placeholder="127.0.0.1:10610" ></input>
	</div>
	<div class="gf-form max-width-30">
		<pre
			class="gf-form-pre">If you enable this feature, you can input http://listenAddr/sms (for example: http://127.0.0.1:10610/sms) into alerting->notification channels->webhook->url </pre>
	</div>
</div>
